package com.wlc.base;

/**
 * @author 王立朝 wanglichao@champion-credit.com
 * @description 整数扩展
 * @date 2021-06-11 15:18
 */
public class Demo3 {

    public static void main(String[] args) {
        int i =0;
        // 8进制 以0 开头
        int i2 = 010;
        // 10进制
        int i3 = 0x10;
        System.out.println(i);
        System.out.println(i2);
        System.out.println(i3);

        // 浮点数拓展
        // 金额比较用：BigDecimal  公式 来进行比较
        float f1 = 0.1f;
        double d1 = 0.1;
        // false
        System.out.println("=======================");
        System.out.println(d1 == f1);
        System.out.println("=======================");
        float f2 = 332343243244323424f;
        float d2 = f2 +1;
        System.out.println(f2 == d2);


        // 字符拓展
        /*
        * 转义字符 \t
        * 换行 \n
        * */
        System.out.println("hello \n wo\trld!");
        System.out.println("=====================");
        String s1 = new String("hello world");
        String s2 = new String("hello world");
        System.out.println("s1==s2 " + (s1 == s2));

        String sc = "hello world";
        String sc2 = "hello world";
        System.out.println("sc==sc2 = " + (sc == sc2));
    }

}
